import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home'
import newHome from '../views/newHome'
import resoldHome from '../views/resoldHome'
import Renting from '../views/Renting'

import Message from '../views/Message'
import Wanted from '../views/Wanted'
import Purchase from '../views/Purchase'
import homeMarket from '../views/homeMarket'
import Live from '../views/Live'
import Group from '../views/Group'
import Ranking from '../views/Ranking'
import Record from '../views/Record'
import RankDetail from '../views/RankDetail'
import newDetail from '../views/newDetail'
import City from '../views/City'
import Consult from '../views/Consult'
import Phone from '../views/Phone'
import VR from '../views/VR'
import rentRecord from '../views/rentRecord'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
  },
  {
    path: '/newHome',
    name: 'newHome',
    component: newHome
  },
  {
    path: '/resoldHome',
    name: 'resoldHome',
    component: resoldHome
  },
  {
    path: '/renting',
    name: 'Renting',
    component: Renting
  },
  {
    path: '/message',
    name: 'Message',
    component: Message
  },
  {
    path: '/wanted',
    name: 'Wanted',
    component: Wanted
  },
  {
    path: '/purchase',
    name: 'Purchase',
    component: Purchase
  },
  {
    path: '/homeMarket',
    name: 'homeMarket',
    component: homeMarket
  },
  {
    path: '/live',
    name: 'Live',
    component: Live
  },
  {
    path: '/group',
    name: 'Group',
    component: Group
  },
  {
    path: '/ranking',
    name: 'Ranking',
    component: Ranking
  },
  {
    path: '/record',
    name: 'Record',
    component: Record
  },
  {
    path: '/rankDetail/:id',
    name: 'RankDetail',
    component: RankDetail
  },
  {
    path: '/newDetail/:id',
    name: 'newDetail',
    component: newDetail
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login')
  },
  {
    path: '/city',
    name: 'City',
    component: City
  },
  {
    path: '/consult',
    name: 'Consult',
    component: Consult
  },
  {
    path: '/phone',
    name: 'Phone',
    component: Phone
  },
  {
    path: '/vr',
    name: 'VR',
    component: VR
  },
  {
    path: '/rentRecord',
    name: 'rentRecord',
    component: rentRecord
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
